<script setup lang="ts">
// tabs 数据
import { onMounted, ref } from 'vue'
import { getCovid19 } from '@/api'

const pageDetail = ref({})
const getPageData = async () => {
  const data = await getCovid19()
  pageDetail.value = data;
  console.log(pageDetail.value.content)
  pageDetail.value.content=pageDetail.value.content.replaceAll("<div", "<div style='background:white;color:var(--color-text)'")
  
}

onMounted(() => {
  getPageData()
})
</script>

<template>
  <div class="layout-container bg-white">
    <div class="posts">
      <h3 class="posts-title">{{ pageDetail?.title }}</h3>
      <div class="posts-content" v-html="pageDetail?.content"></div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.posts {
  padding: 30px;

  .posts-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
  }
}
</style>
